<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>再见Vue</title>
  <script src="../js/vue.js"></script>
  <style>
    .active {
      background-color: orange;
      font-size: 24px;
      border: 1px solid #ccc;
    }

    .box {
      background-color: paleturquoise;
      color: palevioletred;
      margin: 10px;
    }
  </style>
</head>

<body>
  <div id="app">
    <div :class="{ active: isActive }">块级元素</div>
    <div :class="[active1, box1]">块级元素</div>
    <div :class="[isActive? active1 : box1]">块级元素</div>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        isActive: true,
        active1: 'active',
        box1: 'box'
      },
      methods: {

      }
    })
  </script>
</body>

</html>